#pragma once
#include "PDTNode.h"
#include <cmath>

class PDTQuantifier;
class PDTIntRange;
class PDTFunctionDec ;

class PDTVar
{
private:
  string name;
  PDTQuantifier * quantifier;
  PDTIntRange * range;
  PDTFunctionDec * func;
public:
  PDTVar(string & name, PDTQuantifier * aq = NULL, PDTIntRange * aRange = NULL);
  virtual PDTNode * getNode() =0;

  operator PDTNode&()
  {
    return *getNode();
  }

  NodeTypeEnum
  getType()
  {
    return PDTVar_Em;
  }

  PDTFunctionDec* getFunctionDec() const
	{
	  return func;
	}

  PDTQuantifier * getQuantifier() const { 
	  return quantifier;
  }

  PDTIntRange * getRange() const {
	  return range;
  }

  string
  getName() const
  {
    return name;
  }

  void setName(string aName) {
    name = aName;
  }

  void setQuantifier(PDTQuantifier * aQ) {
	  this->quantifier = aQ;
  }

  virtual void setFunctionDec(PDTFunctionDec * f)
  {
 	  func = f;
  }


  bool isBound() {
	  return (quantifier != NULL);
  }

  virtual bool isSequenceVar(){
	  return false;
  }

  virtual PDTNode* getValue(){
	  return NULL;
  }


  virtual  ~PDTVar();
};

